package com.hanthink.common.utils.jpush;

import java.util.HashSet;
import java.util.Map;

import org.apache.commons.collections4.map.HashedMap;

import cn.jiguang.common.resp.APIConnectionException;
import cn.jiguang.common.resp.APIRequestException;
import cn.jpush.api.push.PushResult;

public class JgPushTest {

	public static void main(String[] args) {
		String title = "设备报修";
		String content = "当前设备[EQ094231],正在报修,请及时审核！";
		Map<String, String> map = new HashedMap<>();
		// 设置标签
		HashSet hashSet = new HashSet();
		hashSet.add("ywb");
		// 可以设置多个tag标签
		// hashSet.add("客服");
//		map.put("message", "其他的message消息");
		String[] alias = new String[] { "ld" };
		JpushUtils jpushUtils = new JpushUtils();
		PushResult pushResult;
		try {
//			pushResult = jpushUtils.sendCustomPush(title, content, map, alias);
			JpushUtils.jpushIOS(title, content, map, alias);
//			System.out.println(pushResult.getResponseCode());

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
